package com.kk.demo.java8;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * Created by Yolanda on 2017/1/4.
 */
public class Op {
    List<Integer> list = new ArrayList<>();
    
    
    public Op a(int i) {
        list.add(i);
        return this;
    }

    public Op b(int i) {
        list.add(i);
        return this;
    }

    public Op c(int i) {
        list.add(i);
        return this;
    }

    public void run() {
        list.stream().sorted().forEach(System.out::println);
    }

    public static void main(String[] args) {
        new Op().a(100).b(30).c(1000).run();
    }
}
